#include <REGX52.H>

sbit LED_1=P2^0;
void Dealy(unsigned int x)
{
	while(x--);
}
void main()
{
	unsigned char Time = 0;
	unsigned char i = 0;
	unsigned char x = 0;
	while(1)
	{
		for(i=0;i<100;i++)
		{
			for(x=0;x<20;x++)
			{
			LED_1=0;
			Dealy(i);
			LED_1=1;
			Dealy(100-i);
			}
			
		}
		for(i=100;i>0;i--)
		{
			for(x=0;x<20;x++)
			{
				LED_1=0;
			Dealy(i);
			LED_1=1;
			Dealy(100-i);
			}
			
		}
	}
}
